import React from "react";
import TestCom from "./views/test";

class App extends React.Component {
  constructor() {
    super();
    this.state = {
      show: true,
    };
  }
  render() {
    const { show } = this.state;
    return (
      <div className="App">
        {show ? <TestCom title="2210A"></TestCom> : <div>空空如也</div>}
        <button
          onClick={() => {
            this.setState({
              show: !show,
            });
          }}
        >
          TestCom切换显示隐藏
        </button>
      </div>
    );
  }
}

export default App;
